/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.wfaces.util;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

/**
 *
 * @author ghanemel
 */
public final class Tools {

    private static FacesContext context;

    static {
        context = FacesContext.getCurrentInstance();
    }

    private Tools() {
    }

    public static void pfInfo(String msg) {
        context.addMessage(null, new FacesMessage("Info :"+msg));
    }

    public static void pfWarn(String msg) {
        context.addMessage(null, new FacesMessage("Warning :"+msg));
    }

    public static void pfError(String msg) {
        context.addMessage(null, new FacesMessage("Error :"+msg));
    }
}
